echo %DEVICE_ID% > c:\windows\temp\device.id
echo %FILEWAVE_ID% > c:\windows\temp\client.id

c:\boot\bcdedit.exe | find "winload.efi"
if %errorlevel% EQU 0 (
	set EXT=efi
) else (
	set EXT=exe
)
SET DRIVELETTER=C
c:\boot\bcdedit.exe /create {ramdiskoptions} /d "Ramdisk"
c:\boot\bcdedit.exe /set {ramdiskoptions} ramdisksdidevice partition=%DRIVELETTER%:
c:\boot\bcdedit.exe /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
for /f "tokens=2 delims={}" %%i in ('c:\boot\bcdedit.exe /create /d "Recovery" /application OSLOADER') do (set guid={%%i})
c:\boot\bcdedit.exe /set %guid% device ramdisk=[%DRIVELETTER%:]\boot\boot.wim,{ramdiskoptions}
c:\boot\bcdedit.exe /set %guid% path \windows\system32\winload.%EXT%
c:\boot\bcdedit.exe /set %guid% osdevice ramdisk=[%DRIVELETTER%:]\boot\boot.wim,{ramdiskoptions}
c:\boot\bcdedit.exe /set %guid% systemroot \windows
c:\boot\bcdedit.exe /set %guid% winpe yes
c:\boot\bcdedit.exe /set %guid% detecthal yes
c:\boot\bcdedit.exe /set %guid% description "PSImage"
c:\boot\bcdedit.exe /displayorder %guid% /addfirst
c:\boot\bcdedit.exe -set {bootmgr} timeout 0
c:\boot\bcdedit.exe /default %guid%

shutdown /r /t 0